<template>
  <div class="we">
    <div><i class="fa fa-user-circle"></i></div>
    {{name}}
    <br>
    {{date}}
    <br>
    欢迎登录 Jsinfo Blog 系统
  </div>
</template>

<script>
  export default {
    name: 'We',
    data () {
      return {
        name: '',
        date: ''
      }
    },
    mounted () {
      this.name = localStorage.getItem('userName')
      this.$moment.locale('zh-cn');
      // 使用moment插件格式化日期
      this.date = this.$moment().format('YYYY-MM-DD hh:mm:ss');
    }
  }
</script>

<style scoped>
  .we {
    text-align: center;
    font-size: 20px;
    color: #616165;
  }

  .we i {
    color: #1756d4;
    font-size: 60px;

  }
</style>
